package com.gupao.p7store.common.thread.factory;


import org.jetbrains.annotations.NotNull;

import java.util.Random;
import java.util.concurrent.ThreadFactory;

/**
 * 简单线程工厂
 *
 * @author dengbicheng
 * @date 2021-12-12
 */
public class SimpleThreadFactory implements ThreadFactory {
    @Override
    public Thread newThread(@NotNull Runnable r) {
        return new Thread(r, "Thread_Of_SimpleThreadFactory_"+ new Random().nextInt());
    }
}
